package com.hzsai.service.Impl;

import com.hzsai.mappersa.StudentMapper;
import com.hzsai.pojo.Classes;
import com.hzsai.pojo.Course;
import com.hzsai.pojo.Student;
import com.hzsai.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * hzsai 2019/8/17
 * usage:
 **/
@Service
public class StudentServiceImpl implements StudentService{

    @Autowired
    private StudentMapper mapper;

    @Override
    public Classes findById(Integer id) {
        Classes classes = mapper.findById(id);
        System.out.println("【查的信息】：" + classes);
        return classes;
    }

    @Override
    public Student getById(Integer id) {
        Student stu = mapper.getById(id);
        System.out.println("getById【查的信息】：" + stu);
        return stu;
    }

    @Override
    public Student getCourseById(Integer id) {
        Student student = mapper.getCourseById(id);
        System.out.println("【getCourseById】: " + student);
        return student;
    }

    @Override
    public Course getStudentById(Integer id) {
        Course course = mapper.getStudentById(id);
        System.out.println("【getStudentById】: " + course);
        return course;
    }
}
